<!-- INCLUDE overall_header.html -->

<a name="maincontent"></a>

<!-- IF S_EDIT -->

	<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>

	<script type="text/javascript">
	// <![CDATA[
		function update_icon(new_icon)
		{
			document.getElementById('current_icon').src = (new_icon) ? "{ICONS_PATH}/" + encodeURI(new_icon) : "./images/spacer.gif";
		}
	// ]]>
	</script>

	<h1>{L_ACP_EXPRESS_CATEGORIES}</h1>
	<p>{L_ACP_EXPRESS_CATEGORIES_EXPLAIN}</p>

	<form id="acp_express_catgories" method="post" action="{U_ACTION}">

	<fieldset>
		<legend>{L_ACP_EXPRESS_CATEGORIES}</legend>
	<dl>
		<dt><label for="cat_name">{L_CAT_NAME}:</label></dt>
		<dd><input name="cat_name" type="text" id="cat_name" value="{CAT_NAME}" maxlength="255" /></dd>
	</dl>
	<dl>
		<dt><label for="cat_icon">{L_CAT_ICON}:</label><br />
		<span>{L_CAT_ICON_EXPLAIN}</span></dt>
		<dd><select name="cat_icon" id="cat_icon" onchange="update_icon(this.options[selectedIndex].value);">{S_ICON_FILENAME_LIST}</select></dd>
		<dd><img src="{CAT_ICON}" id="current_icon" alt="" /></dd>
	</dl>
	<dl>
		<dt><label for="display_on_index">{L_CAT_DISPLAY}:</label><br /><span>{L_CAT_DISPLAY_EXPLAIN}</span></dt>
		<dd><label><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
			<label><input type="radio" class="radio" name="display_on_index" value="0"<!-- IF not DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
	</dl>
	<dl>
		<dt><label for="cat_desc">{L_CAT_DESC}:</label><br />
		<span>{L_CAT_DESC_EXPLAIN}</span></dt>
		<dd><input name="cat_desc" type="text" id="cat_desc" value="{CAT_DESC}" maxlength="255" /></dd>
	</dl>

	<p class="submit-buttons">
		<input type="hidden" name="action" value="save" />

		<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
		<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
		{S_FORM_TOKEN}
	</p>
	</fieldset>
	</form>

<!-- ELSE -->

	<h1>{L_ACP_EXPRESS_CATEGORIES}</h1>
	<p>{L_ACP_EXPRESS_CATEGORIES_EXPLAIN}</p>

	<form id="acp_express_categoriea" method="post" action="{U_ACTION}">
	<fieldset class="tabulated">
	<legend>{L_ACP_EXPRESS_CATEGORIES}</legend>

	<p class="quick">
		<input class="button2" name="add" type="submit" value="{L_ADD_CAT}" />
	</p>

	<table cellspacing="1">
	<thead>
	<tr>
		<th>{L_CAT_ICON}</th>
		<th>{L_CAT_NAME}</th>
		<th>{L_CAT_DESC}</th>
		<th>{L_CAT_ARTICLES}</th>
		<th>{L_ACTION}</th>
	</tr>
	</thead>
	<tbody>
	<!-- BEGIN cats -->
		<!-- IF cats.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
		<td style="text-align: center;"><!-- IF cats.S_CAT_ICON --><img src="{cats.CAT_ICON}" alt="{cats.CAT_NAME}" title="{cats.CAT_NAME}" /><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
		<td style="text-align: center;"><a href="{cats.U_CAT}">{cats.CAT_NAME}</a></td>
		<td style="text-align: center;">{cats.CAT_DESC}</td>
		<td style="text-align: center;">{cats.CAT_ARTICLES}</td>
		<td style="text-align: center;">
			<!-- IF cats.S_FIRST_ROW -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{cats.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->&nbsp;
			<!-- IF cats.S_LAST_ROW -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{cats.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->&nbsp;
			<a href="{cats.U_RESYNC}">{ICON_SYNC}</a> <a href="{cats.U_EDIT}">{ICON_EDIT}</a> <a href="{cats.U_DELETE}">{ICON_DELETE}</a>
		</td>
	</tr>
	<!-- END cats -->
	</tbody>
	</table>

	{S_FORM_TOKEN}
	</fieldset>
	</form>

<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->